package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallKdCompany;
import com.appkubes.mall.core.po.MallKdCompanyExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallKdCompanyMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_kd_company
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallKdCompanySqlProvider.class, method="countByExample")
    long countByExample(MallKdCompanyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_kd_company
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallKdCompanySqlProvider.class, method="deleteByExample")
    int deleteByExample(MallKdCompanyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_kd_company
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_kd_company",
        "where kd_company_key = #{kdCompanyKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String kdCompanyKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_kd_company
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_kd_company (kd_company_key, app_key, ",
        "`name`, code, create_time, ",
        "update_time, version)",
        "values (#{kdCompanyKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{createTime,jdbcType=INTEGER}, ",
        "#{updateTime,jdbcType=INTEGER}, #{version,jdbcType=INTEGER})"
    })
    int insert(MallKdCompany record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_kd_company
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallKdCompanySqlProvider.class, method="insertSelective")
    int insertSelective(MallKdCompany record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_kd_company
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallKdCompanySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="kd_company_key", property="kdCompanyKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="code", property="code", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallKdCompany> selectByExampleWithRowbounds(MallKdCompanyExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_kd_company
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallKdCompanySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="kd_company_key", property="kdCompanyKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="code", property="code", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallKdCompany> selectByExample(MallKdCompanyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_kd_company
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "kd_company_key, app_key, `name`, code, create_time, update_time, version",
        "from mall_kd_company",
        "where kd_company_key = #{kdCompanyKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="kd_company_key", property="kdCompanyKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="code", property="code", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallKdCompany selectByPrimaryKey(String kdCompanyKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_kd_company
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallKdCompanySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallKdCompany record, @Param("example") MallKdCompanyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_kd_company
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallKdCompanySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallKdCompany record, @Param("example") MallKdCompanyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_kd_company
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallKdCompanySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallKdCompany record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_kd_company
     *
     * @mbg.generated
     */
    @Update({
        "update mall_kd_company",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "`name` = #{name,jdbcType=VARCHAR},",
          "code = #{code,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER}",
        "where kd_company_key = #{kdCompanyKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallKdCompany record);
}